import bodyParser from 'body-parser';
import express from 'express';
var ejs = require('ejs');
var path = require("path");
module.exports = app => {
	app.set('port', app.libs.config.http.port);
	app.set('views', path.join(process.cwd(), 'views'));
	app.engine('html', ejs.__express);
	app.set('view engine', 'html');
	app.use('/static', express.static(path.join(process.cwd(), 'static')));
	app.use('/lipsync', express.static(path.join(process.cwd(), 'lipsync')));
	// app.use(async (req, res, next) => {
	// 	// let uid = req.header("uid");
	// 	// let user = await userManager.getUserById(uid)
	// 	// req.user = user;
	// 	console.log(123)
	// 	next();
	// })
	app.use(bodyParser.json());
};